#!/usr/local/bin/perl -w
use strict;
use utf8;
use lib '../lib';

use Data::Dumper;
$Data::Dumper::Deparse = 1;

use NG::Sys::App 'NG::Sys::Loop::Run';
use Cwd qw(realpath);

my $app = new NG::Sys::App;

$app->run();

sub on_process {
	$app->syslog("test syslog");
	$app->logger->debug("test logger->debug");
	$app->debug("test debug");
	print $app->{cfg}{path}{crontab},"\n";
	print realpath($0),"\n";
	print $app->fullscript,"\n";
	$app->logger->info("test logger->info");
	$app->logger->error("test logger->error");
	$app->logger->debug("test logger->debug");
	$app->logger->notice("test logger->notice");
	$app->logger->warning("test logger->warning");
	$app->warn_to_logger;
	warn "one";
	warn "two\n";
	warn "three\nfour\n";
	$app->die_to_logger;
	die "oh my die";
}